package ai.people.netmon.warning.service;

import ai.people.netmon.framework.domain.warning.entity.WarningSubject;
import ai.people.netmon.framework.domain.warning.request.subject.AddSubjectRequest;
import ai.people.netmon.framework.domain.warning.request.subject.UpdateSubjectRequest;
import ai.people.netmon.framework.domain.warning.vo.SubjectAnalysisVO;
import ai.people.netmon.framework.domain.warning.vo.WarningSubjectVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author ligua
 * @description 针对表【warning_subject(预警主题表)】的数据库操作Service
 * @createDate 2022-07-28 17:50:38
 */
public interface WarningSubjectService extends IService<WarningSubject> {


    /**
     * 主题分析列表
     *
     * @param userId 用户id
     * @return {@link List}<{@link SubjectAnalysisVO}>
     */
    List<SubjectAnalysisVO> listSubjectAnalysis(Long userId);


    /**
     * 添加主题
     *
     * @param addSubjectRequest 请求添加主题
     */
    void addSubject(AddSubjectRequest addSubjectRequest);


    /**
     * 更新主题
     *
     * @param updateSubjectRequest 更新主题要求
     */
    void updateSubject(UpdateSubjectRequest updateSubjectRequest);


    /**
     * 删除主题
     *
     * @param id id
     */
    void deleteSubject(Long id);


    /**
     * 得到主题
     *
     * @param id id
     * @return {@link WarningSubjectVO}
     */
    WarningSubjectVO getSubject(Long id);


    /**
     * 判断主题重复
     *
     * @param userId              用户id
     * @param subjectName         主题名称
     * @param exclusionSubjectIds 排除对象id
     * @return {@link WarningSubject}
     */
    WarningSubject judgingTopicRepetition(String subjectName, Long userId, List<Long> exclusionSubjectIds);


    /**
     * 通过id查询主题信息
     *
     * @param id id
     * @return {@link WarningSubject}
     */
    WarningSubject getById(Long id);

}
